import { createApp } from 'vue'
import './style.css'
import router from './router'
import App from './App.vue'
// import '/src/assets/styles/styles.scss'
// // import '@popperjs.core'
// import  'bootstrap'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as Elicons from '@element-plus/icons-vue';


// 分页组件
import Pagination from '@/components/Pagination/index.vue'
// 文件上传组件
import FileUpload from '@/components/FileUpload/index.vue'
// 图片上传组件
import ImageUpload from '@/components/ImageUpload/index.vue'
// 图片预览组件
import ImagePreview from '@/components/ImagePreview/index.vue'


const app = createApp(App)

Object.keys(Elicons).forEach((key) => {
    // 如果使用的是ts语法，加上as keyof typeof Elicons可避免报错
    app.component(key, Elicons[key as keyof typeof Elicons]);
});

app.component('Pagination', Pagination)
app.component('UploadFile', FileUpload)
app.component('UploadImage', ImageUpload)
app.component('ImagePreview', ImagePreview)


app.use(router).use(ElementPlus).mount('#app')
